from flask import  Flask,render_template,redirect

app = Flask(__name__)
app.config['SERVER_NAME'] = 'test.com:5000'

@app.route("/dynamic",subdomain="<username>")
@app.route("/dynamic")


def xxxxx(username):
    # return username + ".your-domain.tld"
    print(username)
    return "xxxxx"

if __name__=="__main__":
    app.run()